<?php
    
    require_once('includes/general.php');
    if(!tep_db_checkDb()) die('ko ket noi dc csdl');
    $content='';
    $sql='select * from tbl_gioi_thieu';
                $kq=tep_db_query($sql);
    $content='<div id="menu_left">
                <div class="menu_top"></div>
                <div class="menu_content">
                    <h2>giới thiệu sản phẩm</h2>
                        <ul class="menu">';
    while($item=tep_db_fetch_array($kq)){
        $content.='<li><a href="?page=gioithieusanpham&amp;magioithieu='.$item['id'].'">'.$item['tieu_de'].'</a></li>';    
    }
    $content.='    </ul>
                </div>
                <div class="menu_bottom"></div>
        </div>';   
    $sql='';                      
                                  
    if(isset($_GET['magioithieu'])){
         $magioithieu=$_GET['magioithieu'];
         $sql='select * from tbl_gioi_thieu where id='.$magioithieu;
    }else{
        $sql='select * from tbl_gioi_thieu limit 1';
    }                         
    $kq=tep_db_query($sql);
    $item1=tep_db_fetch_array($kq);                                    
    $content.='<div id="main_content">';
    $content.='    <h1> ..:::.. '.$item1['tieu_de'].' ..:::.. </h1>';            
    $content.='<div id="noidung">'.$item1['mo_ta_chi_tiet'].'</div>';
    $content.='</div>';
            
    echo $content;
?>
   

